package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * 因为涉及到多表联查，所有在mapper中定义了一下抽象方法
 *
 * @author 10161
 */
@Mapper
public interface ArticleMapper extends BaseMapper<ApArticle> {
    /**
     * @param dto
     * @param type           1: 查询更多   2：查询最新
     * @return
     */
    public List<ApArticle> loadArticleList(@Param("dto")ArticleHomeDto dto, @Param("type") Short type);

}
